<div ng-controller="TemplateFormController" class="wrapper-md">
  <div class="panel panel-default">
    <div class="panel-heading">
      <h3 class="panel-title">数据表单</h3>
    </div>
    <div class="panel-body">
      <div class="row">
        <form class="form-horizontal">
          <div class="form-group">
            <label class="col-sm-2 control-label">名称:</label>
            <div class="col-sm-3">
              <input type="text" class="form-control" placeholder="" ng-model="form.name" id="name">
            </div>
            <label class="col-sm-2 control-label col-sm-offset-1">模块:</label>
            <div class="col-sm-3">
              <input type="text" class="form-control" placeholder="" ng-model="form.module" id="module">
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label">模板描述:</label>
            <div class="col-sm-9">
              <textarea type="text" class="form-control" placeholder="" ng-model="form.remark" id="remark"></textarea>
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label">公私类型:</label>
            <div class="col-sm-3">
              <select class="form-control" ng-model="form.type" id="type" ng-options="item.id as item.name for item in typeArr" disabled>
              </select>
            </div>
            <label class="col-sm-2 control-label col-sm-offset-1">引擎类型:</label>
            <div class="col-sm-3">
              <select class="form-control" ng-model="form.tplType" id="tplType" ng-options="item.id as item.name for item in tplTypeArr">
              </select>
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label">名称前缀:</label>
            <div class="col-sm-3">
              <input type="text" class="form-control" placeholder="" ng-model="form.prefix" id="prefix" ng-change="nameChange()">
            </div>
            <label class="col-sm-2 control-label col-sm-offset-1">名称后缀:</label>
            <div class="col-sm-3">
              <input type="text" class="form-control" placeholder="" ng-model="form.suffix" id="suffix" ng-change="nameChange()">
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label">命名类型</label>
            <div class="col-sm-3">
              <select class="form-control" ng-model="form.nameType" id="nameType" ng-options="item.id as item.name for item in nameTypeArr" ng-change="nameChange()">
              </select>
            </div>
            <label class="col-sm-2 control-label col-sm-offset-1">文件类型:</label>
            <div class="col-sm-3">
                <select class="form-control" ng-model="form.fileType" id="fileType" ng-options="item.id as item.name for item in fileTypeArr" ng-change="nameChange()">
                </select>
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label">样例名称:</label>
            <div class="col-sm-9">
              <input type="text" class="form-control" placeholder="" ng-model="form.example" id="example" disabled>
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label">标签名称:</label>
            <div class="col-sm-9">
              <input ui-jq="tagsinput" ui-options="" type="text" class="form-control" ng-model="form.label" id="label">
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-2 control-label">模板内容:</label>
            <div class="col-sm-9">
<!--              <textarea type="text" class="form-control" placeholder="" ng-model="form.content" id="content"></textarea>-->
              <div id="editor—wrapper" class="editor—wrapper">
                <div id="toolbar-container" class="toolbar-container"><!-- 工具栏 --></div>
                <div id="editor-container" class="editor-container"><!-- 编辑器 --></div>
              </div>
            </div>
          </div>
        </form>
      </div>
      <div class="row col-sm-offset-5">
        <button type="button" class="btn btn-primary" ng-click="save()" style="width: 100px">提交</button>
        <button type="button" class="btn btn-primary" ng-click="test()" style="width: 100px">模板预览</button>
      </div>
    </div>
  </div>
</div>
